import React, {Component} from "react";
import Search from "./components/Search";
import List from "./components/List";


export default class App extends Component {
    state = {
        userList: [],
        isFirst: true,
        isLoading: false,
        err: ''
    }

    updateCurrentState = (state: any) => {
        this.setState(state)
    }

    render() {

        return (
            <div className="container">
                <Search updateCurrentState={this.updateCurrentState}/>
                <List currentState={this.state}/>
            </div>
        )
    }
}